package com.overlord.im.connector.message.resolver;

import com.overlord.im.commons.constant.MsgType;
import com.overlord.im.commons.constant.SystemType;
import com.overlord.im.commons.message.OverlordImMessage;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName HeartBeatMessageResolver
 * @Author wuwei
 * @Description NONE
 * @Date 2020/6/2 13:53
 **/
@Slf4j
public class HeartBeatMessageResolver implements Resolver {
    @Override
    public boolean support(OverlordImMessage message) {
        return message.getMsgType() == MsgType.SYSTEM && message.getSystemType() == SystemType.HEART_BEAT;
    }

    @Override
    public void resolve(OverlordImMessage message, ChannelHandlerContext ctx) {
        log.info("接收到心跳消息...");
    }
}
